package com.baizhi.cmfz.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

public class Log implements Serializable {
    /**
     * 主键
     */
    private Integer logId;

    /**
     * 管理员id
     */
    private Integer adminId;

    /**
     * 管理员用户名
     */
    private String adminName;

    /**
     * 操作时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime logDate;

    /**
     * 操作内容  例如：查询所有上师数据  登录  删除上师数据  修改上师数据  注册
     */
    private String logContent;

    /**
     * 操作类型  例如：insert delete update
     */
    private String logType;

    /**
     * ip地址
     */
    private String logIp;

    public Log() {}

    public Integer getLogId() {return this.logId;}

    public Integer getAdminId() {return this.adminId;}

    public String getAdminName() {return this.adminName;}

    public LocalDateTime getLogDate() {return this.logDate;}

    public String getLogContent() {return this.logContent;}

    public String getLogType() {return this.logType;}

    public String getLogIp() {return this.logIp;}

    public void setLogId(Integer logId) {this.logId = logId; }

    public void setAdminId(Integer adminId) {this.adminId = adminId; }

    public void setAdminName(String adminName) {this.adminName = adminName; }

    public void setLogDate(LocalDateTime logDate) {this.logDate = logDate; }

    public void setLogContent(String logContent) {this.logContent = logContent; }

    public void setLogType(String logType) {this.logType = logType; }

    public void setLogIp(String logIp) {this.logIp = logIp; }

    public boolean equals(final Object o) {
        if (o == this) return true;
        if (!(o instanceof Log)) return false;
        final Log other = (Log) o;
        if (!other.canEqual((Object) this)) return false;
        final Object this$logId = this.getLogId();
        final Object other$logId = other.getLogId();
        if (this$logId == null ? other$logId != null : !this$logId.equals(other$logId)) return false;
        final Object this$adminId = this.getAdminId();
        final Object other$adminId = other.getAdminId();
        if (this$adminId == null ? other$adminId != null : !this$adminId.equals(other$adminId)) return false;
        final Object this$adminName = this.getAdminName();
        final Object other$adminName = other.getAdminName();
        if (this$adminName == null ? other$adminName != null : !this$adminName.equals(other$adminName)) return false;
        final Object this$logDate = this.getLogDate();
        final Object other$logDate = other.getLogDate();
        if (this$logDate == null ? other$logDate != null : !this$logDate.equals(other$logDate)) return false;
        final Object this$logContent = this.getLogContent();
        final Object other$logContent = other.getLogContent();
        if (this$logContent == null ? other$logContent != null : !this$logContent.equals(other$logContent))
            return false;
        final Object this$logType = this.getLogType();
        final Object other$logType = other.getLogType();
        if (this$logType == null ? other$logType != null : !this$logType.equals(other$logType)) return false;
        final Object this$logIp = this.getLogIp();
        final Object other$logIp = other.getLogIp();
        if (this$logIp == null ? other$logIp != null : !this$logIp.equals(other$logIp)) return false;
        return true;
    }

    protected boolean canEqual(final Object other) {return other instanceof Log;}

    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $logId = this.getLogId();
        result = result * PRIME + ($logId == null ? 43 : $logId.hashCode());
        final Object $adminId = this.getAdminId();
        result = result * PRIME + ($adminId == null ? 43 : $adminId.hashCode());
        final Object $adminName = this.getAdminName();
        result = result * PRIME + ($adminName == null ? 43 : $adminName.hashCode());
        final Object $logDate = this.getLogDate();
        result = result * PRIME + ($logDate == null ? 43 : $logDate.hashCode());
        final Object $logContent = this.getLogContent();
        result = result * PRIME + ($logContent == null ? 43 : $logContent.hashCode());
        final Object $logType = this.getLogType();
        result = result * PRIME + ($logType == null ? 43 : $logType.hashCode());
        final Object $logIp = this.getLogIp();
        result = result * PRIME + ($logIp == null ? 43 : $logIp.hashCode());
        return result;
    }

    public String toString() {return "Log(logId=" + this.getLogId() + ", adminId=" + this.getAdminId() + ", adminName" +
            "=" + this.getAdminName() + ", logDate=" + this.getLogDate() + ", logContent=" + this.getLogContent() + ", logType=" + this.getLogType() + ", logIp=" + this.getLogIp() + ")";}
}

